home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / async.arc / ASYNCTST.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-03-23  |  512 b   |  22 lines

  1. (* This is a simple terminal program to test the ASYNC.PAS routines.  *)
  2. (* It opens COM1 using 300-E-7-1 format.  The esc key terminates it.  *)
  3. {$i async.pas}
  4. var
  5.   k: char;
  6. begin
  7.   lowvideo;
  8.   clrscr;
  9.   ComOpen(Com1,LowSpeed,EvenParity);
  10.   k := ' ';
  11.   repeat
  12.     if keypressed then
  13.     begin
  14.       read(kbd,k);
  15.       if k <> chr(27) then ComOut(Com1,k);
  16.     end;
  17.     if ComInReady(Com1) then write(ComIn(Com1));
  18.   until k = chr(27);
  19.   ComClose(Com1);
  20.   clrscr;
  21. end.
  22.